package com.hmily.dubbo.consumer.sync;

import com.hmily.dubbo.api.UserQueryFacade;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * <h1>启动时服务依赖检查, 启动类。</h1>
 *
 * @author hmilyylimh
 *         ^_^
 * @version 0.0.1
 *         ^_^
 * @date 2021-10-20
 *
 */
public class XmlCheckConsumerApplication {

    public static void main(String[] args) throws IOException {
        String configPath = "classpath*:META-INF/spring/check_consumer.xml";
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(configPath);
        ctx.refresh();

        // 接口调用
        UserQueryFacade userQueryFacade = ctx.getBean(UserQueryFacade.class);
        // System.out.println(userQueryFacade.queryUser("hmily"));


        // 阻塞等待
        System.in.read();
    }
}
